package my.cn.bdqn.life;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public class MoreActivity extends Activity{
	private TextView headtext;
	private ListView list;
	private List<Integer>data;
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);		
		setContentView(R.layout.more_layout);
		headtext=(TextView)findViewById(R.id.headtext);
		headtext.setText(R.string.more);
		list=(ListView)findViewById(R.id.list);
		getData();
		showData();
	}
	private void getData(){
		data=new ArrayList();
		data.add(R.string.m_about);
		data.add(R.string.m_help);
		data.add(R.string.m_back);
		data.add(R.string.m_logout);
	}
	private void showData(){
		list.setAdapter(new BaseAdapter(){

			public int getCount() {
				// TODO Auto-generated method stub
				return data.size();
			}

			public Object getItem(int position) {
				// TODO Auto-generated method stub
				return data.get(position);
			}

			public long getItemId(int position) {
				// TODO Auto-generated method stub
				return position;
			}

			public View getView(int position, View view, ViewGroup root) {
				// TODO Auto-generated method stub
				view=getLayoutInflater().inflate(R.layout.list_item, null);
				TextView text=(TextView)view.findViewById(R.id.tv);
				text.setText(data.get(position));
				return view;
			}});
	}
}





